package com.cn.wxwinnie.java.mythread.fourthreadWithOneFunction;

/**
 * @author 潇湘暮雨 E-mail:wxwinnie@hotmail.com
 * 
 * @version 创建时间：2014年3月23日 上午8:05:21
 * 
 */
public class Test {

	public static void main(String[] args) {

		Thread ta1 = new Thread(new ThreadAdd());
		Thread ta2 = new Thread(new ThreadAdd());
		Thread ta3 = new Thread(new ThreadAdd());

		Thread ts1 = new Thread(new ThreadSub());
		Thread ts2 = new Thread(new ThreadSub());

		ta1.setName("ta1");
		ta2.setName("ta2");
		ta3.setName("ta3");
		ts1.setName("ts1");
		ts2.setName("ts2");

		ts1.start();
		ts2.start();
		ta1.start();
		ta2.start();
		ta3.start();
	}

}
